home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Utilities / MCControl / Install / MCControl.install < prev    next >
Encoding:
Text File  |  2001-04-11  |  33.0 KB  |  891 lines

  1. ; $VER: MCControl.install 1.60 (11.04.01)
  2. ; Install script for MCControl (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. (SET #ApplicationName "MCControl")
  7. (SET #ApplicationDir "sys:tools")
  8. (SET #ApplicationDir1 "sys:utilities")
  9. (SET #ApplicationDir2 "work:tools")
  10. (SET #ApplicationDir3 "tools:")
  11. (SET #ApplicationDir4 "work:utilities")
  12. (SET #ArchiveDir "/")
  13. (SET #Language -1)
  14. (SET #Documents -1)
  15. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  16. ;=============================================================================
  17. ; English strings
  18.  
  19. (SET default_lang 1)
  20.  
  21. (SET #bad-kick "You must have at least Workbench 2.0+")
  22. (SET #bad-installer
  23. (CAT "You have an old version of the program 'Installer' "
  24.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  25.      "Please check your configuration!\n"
  26. ))
  27.  
  28. (SET #App-InstallMsg
  29. (CAT "\n\n%s Installation Script.\n\n"
  30.         "This script installs %s on your Amiga.\n\n"
  31.         "Read the guide file for more information\n"
  32.         " on the distribution of %s.\n\n"
  33.         "%s © 1995-2001 Guido Mersmann\n"
  34.         "All rights reserved."
  35. ))
  36. (SET #App-MainMode "Please choose mode:")
  37.  
  38. (SET #App-Where
  39. (CAT "Where would you like to install %s ?\n"
  40.         "(A drawer will be created)"
  41. ))
  42.  
  43. (SET #App-Update
  44. (CAT "\n\nA %s drawer does already exist in the selected "
  45.         " directory.\n\n By selecting \"Proceed\", you"
  46.         " indicate that you want to update the %s"
  47.         " installation with the most recent version.\n\n"
  48.         "Several %s specific files will be overwritten!"
  49. ))
  50.  
  51. (SET #App-Main "Which %s version should be installed ?")
  52. (SET #App-Main-help
  53. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  54.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  55.      " Special OS3.0+ functions are used to save more memory."
  56. ))
  57.  
  58. (SET #App-Language "Which languages should be installed ?")
  59. (SET #App-Language-help
  60. (CAT "\nThe Amiga can be operated in many different"
  61.           " languages."
  62.           "To reduce the amount of space consumed by the"
  63.           " language files, you can select to have only the"
  64.           " files of specific languages copied.\n\n"
  65.           "Simply check the boxes of the languages you wish"
  66.           " to have available on your system.\n\n"
  67.           @askoptions-help
  68. ))
  69.  
  70. (SET #App-Help "Which Amiga-guide files should be installed ?")
  71.  
  72. (SET #App-Exit "\n\n%s installed !!\n\n%s can be found in your \"%s\" drawer (or partiton).")
  73. ;--------- DEINSTALLATION STRINGS
  74. (SET #App-DeInstallWhere "Where is the location of %s ?\n")
  75. (SET #App-Install "Install")
  76. (SET #App-DeInstall "Deinstall")
  77. (SET #bad-DeInstall "There is no %s installation at the specified position!")
  78. (SET #StartupRemove-prompt "\nRemove %s lines within your user-startup?")
  79. (SET #Deinstall-Done "\n%s is now deinstalled.")
  80. ;=============================================================================
  81. ; German strings
  82.  
  83. (IF (= @language "deutsch")
  84. (
  85. (SET default_lang 2)
  86.  
  87. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  88. (SET #bad-installer
  89. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  90.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  91.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  92. ))
  93.  
  94. (SET #App-InstallMsg
  95. (CAT "\n%s Installationsskript.\n\n"
  96.         "Dieses Skript installiert oder deinstalliert\n"
  97.         "%s auf Ihrem Amiga.\n\n"
  98.         "Lesen Sie die Anleitungsdatei für weitere Informationen"
  99.         " über den Vertrieb von %s.\n\n"
  100.         "%s © 1999-2001 Guido Mersmann\n"
  101.         "Alle Rechte reserviert."
  102. ))
  103. (SET #App-MainMode "Wählen Sie den gewünschten Vorgang:")
  104.  
  105. (SET #App-Where
  106. (CAT "Wo möchten Sie %s installieren ?\n"
  107.         "(Ein Verzeichnis wird angelegt)"
  108. ))
  109.  
  110. (SET #App-Update
  111. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  112.         " Verzeichnis.\n\n Wenn Sie fortfahren,"
  113.         " bestätigen Sie, daß Sie die alte %s-Installation"
  114.         " mit der neuesten Version überschreiben wollen.\n\n"
  115.         "Verschiedene %s-Dateien (z.B überflüssige Dateien) werden falls nötig überschrieben!"
  116. ))
  117.  
  118. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  119. (SET #App-Main-help
  120. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  121.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  122.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  123.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das Selbe"
  124.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  125.      " weiteren Speicher sparen."
  126. ))
  127.  
  128. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  129.  
  130. (SET #App-Language-help
  131. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  132.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  133.          " nur die Sprachen anwählen, die sie benötigen"
  134.          " Haken Sie also einfach die Sprachen ab, die Sie"
  135.          " Ihrem System zugänglich machen wollen."
  136.           @askoptions-help
  137. ))
  138.  
  139. (SET #App-Help "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  140.  
  141. (SET #App-Exit "\n\n%s installiert!!\n\nSie finden %s im Verzeichnis \"%s\"")
  142. ;------- DEINSTALL STRINGS
  143. (SET #App-DeinstallWhere "Wo liegt %s auf Ihrer Platte ?\n")
  144. (SET #App-Install "%s Installieren")
  145. (SET #App-DeInstall "%s Deinstallieren")
  146. (SET #bad-DeInstall "Es gibt keine %s Installation an der angegeben Position")
  147. (SET #StartupRemove-prompt "\n\nDie zu %s gehörenden Einträge in der User-startup werden gelöscht!")))
  148. (SET #Deinstall-Done "\n%s ist jetzt deinstalliert!")
  149. ;=============================================================================
  150. ; français strings
  151.  
  152. (IF (= @language "français")
  153. (
  154. (SET default_lang 4)
  155.  
  156. (SET #bad-kick "Vous devez avoir le Workbench 2.0 au moins")
  157. (SET #bad-installer
  158. (CAT "Vous avez une ancienne version du programme 'Installer' "
  159.      "sur votre Amiga!\n\nLa procédure d'installation a besoin d'Installer 42.9 ou supérieur.\n\n"
  160.      "Veuillez vérifier votre configuration!\n"
  161. ))
  162.  
  163. (SET #App-InstallMsg
  164. (CAT "\n\nScript d'installation pour %s.\n\n"
  165.         "Ce script installe %s sur votre Amiga.\n\n"
  166.         "Lisez le guide pour de plus amples informations\n"
  167.         " sur cette distribution de %s.\n\n"
  168.         "%s © 1995-2000 Guido Mersmann\n"
  169.         "Tous droits réservés."
  170. ))
  171. (SET #App-MainMode "Veuillez choisir le mode:")
  172.  
  173. (SET #App-Where
  174. (CAT "Où voulez-vous installer %s ?\n"
  175.         "(Un tiroir sera crée)"
  176. ))
  177.  
  178. (SET #App-Update
  179. (CAT "\n\nUn tiroir %s existe déja dans le répertoire "
  180.         " sélectionné.\n\n En sélectionnant \"Continuer\", vous"
  181.         " indiquez que vous voulez mettre à jour l'installation"
  182.         " de %s par la version la plus récente.\n\n"
  183.         "Plusieurs fichiers spécifiques à %s vont être mis à jour!"
  184. ))
  185.  
  186. (SET #App-Main "Quelle version de %s doit être installée ?")
  187. (SET #App-Main-help
  188. (CAT "La version OS2.0+ ne devrait être utilisée que sur un système tournant sous AmigaOS 2."
  189.      " Les versions OS2.1+ et OS3.0+ utilisent moins de mémoire. Le système de localisation est nécéssaire!"
  190.      " Des fonction spéciales de l'OS3.0+ sont utilisées pour gagner plus de mémoire."
  191. ))
  192.  
  193. (SET #App-Language "Quelles langues doivent être installées ?")
  194. (SET #App-Language-help
  195. (CAT "\nL'Amiga peut être utilisé dans beaucoup de langues"
  196.           " différentes."
  197.           "Pour réduire la place utilisée par les fichiers de"
  198.           " localisation, vous pouvez choisir de n'avoir"
  199.           " que certaines langues spécifiques installées.\n\n"
  200.           "Sélectionnez simplement les cases à cocher correspondant aux"
  201.           " langues que vous voulez sur votre système.\n\n"
  202.           @askoptions-help
  203. ))
  204.  
  205. (SET #App-Help "Quels fichiers d'aide doivent être installés ?")
  206.  
  207. (SET #App-Exit "\n\n%s est installé !!\n\n%s se trouve dans le tiroir (ou la partition) \"%s\".")
  208. ;--------- DEINSTALLATION STRINGS
  209. (SET #App-DeInstallWhere "Où est situé %s ?\n")
  210. (SET #App-Install "Installer")
  211. (SET #App-DeInstall "Désinstaller")
  212. (SET #bad-DeInstall "Il n'y a aucune installation de %s à l'emplacement spécifié!")
  213. (SET #StartupRemove-prompt "\nSuppression des lignes relatives à %s dans votre user-startup?")
  214. (SET #Deinstall-Done "\n%s est maintenant désinstallé.")
  215. ;---------
  216. ))
  217. ;=============================================================================
  218. ; Español strings
  219.  
  220. (IF (= @language "español")
  221. (
  222. (SET default_lang 8)
  223.  
  224. (SET #bad-kick "Necesitas al menos Workbench 2.0+")
  225. (SET #bad-installer
  226. (CAT "Tienes una versión antigua del 'Installer' "
  227.      "en tu Amiga!\n\nEl proceso de instalación requiere al menos el Installer 42.9.\n\n"
  228.      "Revisa tu configuración!\n"
  229. ))
  230.  
  231. (SET #App-InstallMsg
  232. (CAT "\n\nGuión de instalación de %s .\n\n"
  233.         "Este script instala %s en tu Amiga.\n\n"
  234.         "Lee el amigaguide para más información\n"
  235.         " sobre la distribución de %s.\n\n"
  236.         "%s © 1995-2001 Guido Mersmann\n"
  237.         "Todos los derechos reservados."
  238. ))
  239. (SET #App-MainMode "Elige uno de los modos:")
  240.  
  241. (SET #App-Where
  242. (CAT "¿ Dónde quieres instalar %s ?\n"
  243.         "(Un cajón será creado)"
  244. ))
  245.  
  246. (SET #App-Update
  247. (CAT "\n\nYa existe un cajón %s en ese"
  248.         " directorio.\n\n Si seleccionas \"Seguir\","
  249.         " actualizarás la instalación %s"
  250.         " con la versión más reciente.\n\n"
  251.         "!Algunos ficheros específicos de %s serán sobreescritos¡"
  252. ))
  253.  
  254. (SET #App-Main "¿ Qué versión de %s quieres instalar ?")
  255. (SET #App-Main-help
  256. (CAT "La versión OS2.0+ sólo debería funcionar bajo sistemas con OS2."
  257.      " Las versiones OS2.1+ y OS3.0+ requieren menos Memoria. Necesitas Locale!"
  258.      " Algunas funciones del OS3.0+ reducen el consumo de memoria."
  259. ))
  260.  
  261. (SET #App-Language "¿ Qué lenguajes quieres instalar ?")
  262. (SET #App-Language-help
  263. (CAT "\nRl Amiga puede trabajar en numerosos lenguajes"
  264.           " diferentes."
  265.           "Parar reducir la cantidad de espacio necesaria para los"
  266.           " ficheros de lenguaje, puedes copiar sólo"
  267.           " los lenguajes específicos.\n\n"
  268.           "Marca las cajas de los lenguajes que quieras"
  269.           " tener disponibles en tu sistema.\n\n"
  270.           @askoptions-help
  271. ))
  272.  
  273. (SET #App-Help "¿Qué Amiga-guides queres instalar ?")
  274.  
  275. (SET #App-Exit "\n\n%s instalado !!\n\n%s está en el cajón \"%s\" (o partición).")
  276. ;--------- DEINSTALLATION STRINGS
  277. (SET #App-DeInstallWhere "¿ En qué directorio está %s ?\n")
  278. (SET #App-Install "Instalar")
  279. (SET #App-DeInstall "Desinstalar")
  280. (SET #bad-DeInstall "No hay instalación de %s en el lugar indicado")
  281. (SET #StartupRemove-prompt "\n¿ Elimino las líneas %s de tu fichero user-startup ?")
  282. (SET #Deinstall-Done "\n%s ha sido desinstalado.")
  283. ;---------
  284. ))
  285. ;=============================================================================
  286. ; Português strings
  287.  
  288. (IF (= @language "português")
  289. (
  290. (SET default_lang 16)
  291.  
  292. (SET #bad-kick "Você necessita pelo menos do Workbench 2.0+")
  293. (SET #bad-installer
  294. (CAT "Você tem uma versão antiga do 'Installer' "
  295.      "no seu Amiga!\n\nO processo de instalação requer no minimo o Installer 42.9.\n\n"
  296.      "Por favor verifique a sua configuração!\n"
  297. ))
  298.  
  299. (SET #App-InstallMsg
  300. (CAT "\n\nScript de instalação %s .\n\n"
  301.         "Este script instala %s no seu Amiga.\n\n"
  302.         "Leia o documento amigaguide para mais informações\n"
  303.         " acerca da distribução de %s.\n\n"
  304.         "%s © 1995-2001 Guido Mersmann\n"
  305.         "Todos os direitos reservados."
  306. ))
  307. (SET #App-MainMode "Por favor escolha um dos modos:")
  308.  
  309. (SET #App-Where
  310. (CAT "Onde deseja instalar %s ?\n"
  311.         "(Será criado uma gaveta)"
  312. ))
  313.  
  314. (SET #App-Update
  315. (CAT "\n\njá existe uma gaveta %s nesse"
  316.         " directório.\n\n Se seleccionar \"Proceguir\", você"
  317.         " indicará que deseja actualizar a instalação %s"
  318.         " para a versão mais recente.\n\n"
  319.         "Alguns ficheiros específicos em %s seram sobstituidos!"
  320. ))
  321.  
  322. (SET #App-Main "Que versão de %s deseja instalar ?")
  323. (SET #App-Main-help
  324. (CAT "A versão OS2.0+ só deve ser usada em Sistemas com o OS2."
  325.      " As versões OS2.1+ e OS3.0+ requerem menos Memória. Necessita do Locale!"
  326.      " Algumas funções do OS3.0+ reduzem o consumo de memória."
  327. ))
  328.  
  329. (SET #App-Language "Que idioma deseja instalar ?")
  330. (SET #App-Language-help
  331. (CAT "\nO Amiga pode funcionar com vários idiomas"
  332.           " diferentes."
  333.           "Para reduzir a quantidade de espaço necessário para os"
  334.           " ficheiros de idiomas, você pode copiar só"
  335.           " os idiomas que quiser.\n\n"
  336.           "Simplesmente veja as gavetas dos idiomas que quer"
  337.           " ter disponíveis no seu Sistema.\n\n"
  338.           @askoptions-help
  339. ))
  340.  
  341. (SET #App-Help "Que documentos Amiga-guides deseja instalar ?")
  342.  
  343. (SET #App-Exit "\n\n%s instalado !!\n\n%s pode ser encontrado na gaveta \"%s\" (ou partição).")
  344. ;--------- DEINSTALLATION STRINGS
  345. (SET #App-DeInstallWhere "Em que directório está %s ?\n")
  346. (SET #App-Install "Instalar")
  347. (SET #App-DeInstall "Desinstalar")
  348. (SET #bad-DeInstall "Não existe nenhuma instalação de %s no lugar indicado")
  349. (SET #StartupRemove-prompt "\nRemovo as linhas %s no seu ficheiro user-startup ?")
  350. (SET #Deinstall-Done "\n%s foi agora desinstalado.")
  351. ;---------
  352. ))
  353. ;=============================================================================
  354. ; Polish strings
  355.  
  356. (IF (= @language "polski")
  357. (
  358. (SET default_lang 32)
  359.  
  360. (SET #bad-kick "Ten program wymaga co najmniej systemu Workbench 2.0+")
  361. (SET #bad-installer
  362. (CAT "Na swojej Amidze masz starâ wersjë 'Installera' !"
  363.      "\nTen skrypt wymaga Installera w wersji 42.0.\n\n"
  364.      "Proszë sprawdú swojâ konfiguracjë!\n"
  365. ))
  366.  
  367. (SET #App-InstallMsg
  368. (CAT "\n\nSkrypt instalujâcy %s.\n\n"
  369.         "Ten skrypt zainstaluje %s na Twojej Amidze.\n\n"
  370.         "Wiëcej informacji o dystrybucji %s\n"
  371.         " znajdziesz w dokumentacji.\n\n"
  372.         "%s © 1995-2001 Guido Mersmann\n"
  373.         "Wszelkie prawa zatrzeûone."
  374. ))
  375. (SET #App-MainMode "Wybierz tryb:")
  376.  
  377. (SET #App-Where
  378. (CAT "Gdzie chcesz zainstalowaê %s ?\n"
  379.         "(Katalog zostanie utworzony)"
  380. ))
  381.  
  382. (SET #App-Update
  383. (CAT "\n\nKatalog %s istnieje juû w wybranym miejscu"
  384.         "\n\n Wybierz  \"Proceed\", "
  385.         " jeûeli chcesz dokonaê aktualizacji %s"
  386.         " z najnowszâ dostëpnâ wersjâ.\n\n"
  387.         "Kilka plików %s zostanie zapisanych na nowo!"
  388. ))
  389.  
  390. (SET #App-Main "Która wersja %s powinna zostaê zainstalowana?")
  391. (SET #App-Main-help
  392. (CAT "Wersja OS2.0+ powinna byê uûywana na systemach OS2."
  393.      " Wersje OS2.1+ i OS3.0+ potrzebujâ mniej pamiëci. Wymagajâ jednak lokalizacji!"
  394.      " Specjane funkcje OS3.0+ uûywane sâ aby zmniejszyê zuûycie pamiëci."
  395. ))
  396.  
  397. (SET #App-Language "Które jëzyki powinny zostaê zainstalowane?")
  398. (SET #App-Language-help
  399. (CAT "\nAmiga moûe dziaîaê w wielu róûnych"
  400.           " jëzykach."
  401.           "Aby zmniejszyê iloôê uûywanego przez pliki"
  402.           " z tîumaczeniami, powinieneô wybraê tylko interesujâce"
  403.           " Cië pliki.\n\n"
  404.           "Po prostu zaznacz odpowiednie jëzyki, które chcesz"
  405.           " mieê zainstalowane na swoim dysku.\n\n"
  406.           @askoptions-help
  407. ))
  408.  
  409. (SET #App-Help "Które pliki Amiga-guide powinny zostaê zainstalowane?")
  410.  
  411. (SET #App-Exit "\n\n%s zostaî zaistalowany!!\n\n%s znajdziesz w katalogu \"%s\".")
  412. ;--------- DEINSTALLATION STRINGS
  413. (SET #App-DeInstallWhere "Gdzie znajduje sië %s ?\n")
  414. (SET #App-Install "Instaluj")
  415. (SET #App-DeInstall "Odinstaluj")
  416. (SET #bad-DeInstall "W wybranym miejscu nie ma %s !")
  417. (SET #StartupRemove-prompt "\nUsunâê linie %s ze swojego pliku user-startup?")
  418. (SET #Deinstall-Done "\n%s zostaî odinstalowany.")
  419. ;---------
  420. ))
  421. ;=============================================================================
  422.  
  423. ;----------------------------------------------------------------------------
  424. ;----------------------------------------------------------------------------
  425. ;       P_Requirements
  426. ;----------------------------------------------------------------------------
  427. ;----------------------------------------------------------------------------
  428. (PROCEDURE P_Requirements
  429. ; Workbench 37 or better required
  430. (IF (< (/ (getversion) 65536) 37)
  431. (
  432.   (abort #bad-kick)
  433. )
  434. )
  435. ; Installer 42.9 or better required
  436. (if (< @installer-version 2752521)
  437. (
  438. (abort #bad-installer)
  439. )
  440. ) ;if
  441. ) ;PROCDURE
  442. ;----------------------------------------------------------------------------
  443. ;----------------------------------------------------------------------------
  444. ;       P_DeInstall
  445. ;----------------------------------------------------------------------------
  446. ;----------------------------------------------------------------------------
  447. (PROCEDURE P_DeInstall #InstallerMode
  448.  
  449. (SET #Dummy             (ASKCHOICE
  450.                         (PROMPT #App-MainMode)
  451.                         (HELP @askchoice-help)
  452.                         (CHOICES
  453.                                 (#App-Install #ApplicationName)
  454.                                 (#App-Deinstall #ApplicationName)
  455.                         )
  456.                         ;(DEFAULT #Documents)
  457.                         )
  458. )
  459. ) ;PROCDURE
  460. ;----------------------------------------------------------------------------
  461. ;----------------------------------------------------------------------------
  462. ;       GetApplicationDir
  463. ;----------------------------------------------------------------------------
  464. ;----------------------------------------------------------------------------
  465. (PROCEDURE P_GetApplicationDir
  466. (SET #Dummy #ApplicationDir)
  467. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  468. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  469. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  470. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  471.  
  472. (SET #ApplicationDir
  473.         (TACKON
  474.                 (ASKDIR
  475.                         (PROMPT (#App-Where #ApplicationName))
  476.                         (HELP @askdir-help)
  477.                         (default #Dummy)
  478.                 )
  479.                 #ApplicationName
  480.         )
  481. )
  482. (SET @default-dest #ApplicationDir)
  483. ) ;PROCEDURE
  484. ;----------------------------------------------------------------------------
  485. ;----------------------------------------------------------------------------
  486. ;       GetDeinstallDir
  487. ;----------------------------------------------------------------------------
  488. ;----------------------------------------------------------------------------
  489. (PROCEDURE P_GetDeInstallDir
  490. (SET #Dummy #ApplicationDir)
  491. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  492. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  493. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  494. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  495.  
  496. (SET #ApplicationDir
  497.                 (ASKDIR
  498.                         (PROMPT (#App-DeInstallWhere #ApplicationName))
  499.                         (HELP @askdir-help)
  500.                         (default #Dummy)
  501.                 )
  502. )
  503.          (SET #Dummy (EXISTS (TACKON #Applicationdir #ApplicationName)))
  504.  
  505.         (Select #Dummy
  506.          (abort (#bad-DeInstall #ApplicationName))
  507.          (SET #Applicationdir #Applicationdir)
  508.          (SET #Applicationdir (TACKON #Applicationdir #ApplicationName))
  509.         ) ;Select
  510. (SET @default-dest #ApplicationDir)
  511.  
  512. ) ;PROCEDURE
  513. ;----------------------------------------------------------------------------
  514. ;----------------------------------------------------------------------------
  515. ;       Ask for Catalogs
  516. ;----------------------------------------------------------------------------
  517. ;----------------------------------------------------------------------------
  518. (PROCEDURE P_AskCatalogs #Language
  519.  
  520. (SET #Dummy     (ASKOPTIONS
  521.                 (PROMPT #App-Language)
  522.                 (HELP #App-Language-help)
  523.                 (CHOICES
  524.                         "English"
  525.                         "Deutsch"
  526.                         "Français"
  527.                         "Español"
  528.                         "Português"
  529.                         "Polski"
  530.                 )
  531.                 (DEFAULT default_lang)
  532.         )
  533. )
  534.  
  535. (IF (AND (> #Binary 0) (= #Dummy 0))
  536.  (SET #Dummy 1)
  537. )
  538. (IF (= #Binary 0)
  539.  (SET #Dummy (BITAND #Dummy (BITNOT 1)))
  540. )
  541. (SET #Dummy #Dummy) ;Return #Dummy
  542. ) ;PROCEDURE
  543. ;----------------------------------------------------------------------------
  544. ;----------------------------------------------------------------------------
  545. ;       Copy Selected Catalogs
  546. ;----------------------------------------------------------------------------
  547. ;----------------------------------------------------------------------------
  548. (PROCEDURE P_CopyCatalogs #Language
  549. (SET n 0)
  550. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  551. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  552. (MAKEDIR #DestinationRoot)
  553.  
  554. (while (< n 6)
  555.         (SET #Dummy (SELECT n "english" "deutsch" "français" "español" "português" "polski"))
  556.         (
  557.                 (IF (IN #Language n)
  558.                 (
  559.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  560.                         (COPYFILES
  561.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  562.                                 (DEST (TACKON #DestinationRoot #Dummy))
  563.                                 (HELP @copyfiles-help)
  564.                                 (ALL)
  565.                         )
  566.                 )
  567.                 )
  568.         )
  569. (SET n (+ n 1))
  570. )
  571. ) ;PROCEDURE
  572. ;----------------------------------------------------------------------------
  573. ;----------------------------------------------------------------------------
  574. ;       Ask for Help
  575. ;----------------------------------------------------------------------------
  576. ;----------------------------------------------------------------------------
  577. (PROCEDURE P_AskHelp #Documents
  578. (SET #Dummy             (ASKOPTIONS
  579.                         (PROMPT #App-Help)
  580.                         (HELP @askoptions-help)
  581.                         (CHOICES
  582.                                 "english"
  583.                                 "deutsch"
  584.                         )
  585.                         (DEFAULT default_lang)
  586.                   )
  587. )
  588. ) ;PROCEDURE
  589. ;----------------------------------------------------------------------------
  590. ;----------------------------------------------------------------------------
  591. ;       Copy Help
  592. ;----------------------------------------------------------------------------
  593. ;----------------------------------------------------------------------------
  594. (PROCEDURE P_CopyHelp #Documents
  595. (SET n 0)
  596. (SET #DestinationRoot (TACKON #ApplicationDir "Help"))
  597. (SET #SourceRoot (TACKON #ArchiveDir "Help"))
  598. (MAKEDIR #DestinationRoot)
  599.  
  600. (while (< n 2)
  601.         (SET #Dummy (SELECT n
  602.                 "english"
  603.                 "deutsch"
  604.         )
  605.         )
  606.         (
  607.                 (IF (IN #Documents n)
  608.                 (
  609.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  610.                         (COPYFILES
  611.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  612.                                 (DEST (TACKON #DestinationRoot #Dummy))
  613.                                 (HELP @copyfiles-help)
  614.                                 (INFOS)
  615.                                 (ALL)
  616.                         )
  617.                 )
  618.                 )
  619.         )
  620. (SET n (+ n 1))
  621. )
  622. ) ;PROCEDURE
  623. ;----------------------------------------------------------------------------
  624. ;----------------------------------------------------------------------------
  625. ;       Copy_Dir (Dir)
  626. ;----------------------------------------------------------------------------
  627. ;----------------------------------------------------------------------------
  628. (PROCEDURE P_CopyDir #Dummy
  629.  
  630. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  631. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  632. (MAKEDIR #DestinationRoot)
  633.  
  634.                    (COPYFILES
  635.         (SOURCE #SourceRoot)
  636.         (DEST #DestinationRoot)
  637.         (HELP @copyfiles-help)
  638.         (OPTIONAL <force>)
  639.         (ALL)
  640.         (INFOS)
  641.                    )
  642. ) ;PROCEDURE
  643. ;----------------------------------------------------------------------------
  644. ;----------------------------------------------------------------------------
  645. ;       Copy_File (Name)
  646. ;----------------------------------------------------------------------------
  647. ;----------------------------------------------------------------------------
  648. (PROCEDURE P_CopyFile #Dummy
  649.  
  650. (if (<> (exists (TACKON #ArchiveDir #Dummy) (noreq)) 0) 
  651. (
  652.                    (COPYFILES
  653.         (SOURCE (TACKON #ArchiveDir #Dummy))
  654.         (DEST #ApplicationDir)
  655.         (HELP @copyfiles-help)
  656.         (OPTIONAL <force>)
  657.         (ALL)
  658.         (INFOS)
  659.                    )
  660. )
  661. ) ;If
  662. ) ;PROCEDURE
  663. ;----------------------------------------------------------------------------
  664. ;----------------------------------------------------------------------------
  665. ;       P_Update
  666. ;----------------------------------------------------------------------------
  667. ;----------------------------------------------------------------------------
  668. (PROCEDURE P_Update
  669. (if (= (exists #ApplicationDir) 2)
  670.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  671. )
  672. ) ;PROCEDURE
  673. ;----------------------------------------------------------------------------
  674. ;----------------------------------------------------------------------------
  675. ;       P_AskBinary
  676. ;----------------------------------------------------------------------------
  677. ;----------------------------------------------------------------------------
  678. (PROCEDURE P_AskBinary
  679. (set #Dummy (/ (getversion) 65536))
  680.  
  681. (if (= #Dummy 37) (set #Binary 0))
  682. (if (= #Dummy 38) (set #Binary 1))
  683. (if (>= #Dummy 39) (set #Binary 2))
  684.  
  685. (set #Dummy (/ (getversion "icon.library" (Resident)) 65536))
  686. (if (>= #Dummy 44) (set #Binary 3))
  687.  
  688. (set #Binary (askchoice
  689.         (prompt (#App-Main #ApplicationName))
  690.         (help (#App-Main-help #ApplicationName))
  691.         (choices
  692.                         "OS2.0+"
  693.                         "OS2.1+"
  694.                         "OS3.0+"
  695.                         "OS3.5+"
  696.                         )
  697.         (default #Binary)
  698.             )
  699. )
  700. ) ;PROCEDURE
  701. ;----------------------------------------------------------------------------
  702. ;----------------------------------------------------------------------------
  703. ;       P_CopyBinary
  704. ;----------------------------------------------------------------------------
  705. ;----------------------------------------------------------------------------
  706. (PROCEDURE P_CopyBinary #Dummy
  707.  
  708. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30") (CAT "Bin/" #Dummy "_OS35") ))
  709. (copyfiles
  710.         (source (tackon #ArchiveDir #BinaryName) (infos))
  711.         (dest #ApplicationDir)
  712.         (newname #Dummy)
  713.         (help @copyfiles-help)
  714.         (optional <force>)
  715. )
  716. ) ;PROCEDURE
  717. ;----------------------------------------------------------------------------
  718. ;----------------------------------------------------------------------------
  719. ;       P_KeyFile
  720. ;----------------------------------------------------------------------------
  721. ;----------------------------------------------------------------------------
  722. (PROCEDURE P_KeyFile
  723.  
  724. (SET #Dummy (tackon (tackon #ArchiveDir "Keyfile") #ApplicationKeyfile))
  725.  
  726. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  727. )
  728. ) ;PROCEDURE
  729. ;----------------------------------------------------------------------------
  730. ;----------------------------------------------------------------------------
  731. ;       P_CopyArchiveIcon
  732. ;----------------------------------------------------------------------------
  733. ;----------------------------------------------------------------------------
  734. (PROCEDURE P_CopyArchiveIcon
  735.                    (COPYFILES
  736.         (SOURCE (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  737.         (DEST (TACKON #ApplicationDir "/"))
  738.         (HELP @copyfiles-help)
  739.                    )
  740. ) ;PROCEDURE
  741. ;----------------------------------------------------------------------------
  742. ;----------------------------------------------------------------------------
  743. ;       P_AskBool
  744. ;----------------------------------------------------------------------------
  745. ;----------------------------------------------------------------------------
  746. (PROCEDURE P_AskBool #dummy
  747.  (SET #dummy (ASKBOOL      (prompt #dummy)
  748.            (help @askbool-help)
  749.            (default 1)
  750.              )
  751.  )
  752. ) ;PROCEDURE
  753. ;----------------------------------------------------------------------------
  754. ;----------------------------------------------------------------------------
  755. ;       MAIN
  756. ;----------------------------------------------------------------------------
  757. ;----------------------------------------------------------------------------
  758. (P_Requirements)
  759. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  760. (SET #InstallerMode (P_DeInstall))
  761. (welcome)
  762. ;-----------------------------------------------
  763. (IF (= #InstallerMode "0")
  764. (
  765. ;-----------------------------------------------
  766.  (SET #ApplicationDir (P_GetApplicationDir))
  767.  
  768. (COMPLETE 1)
  769.  (P_Update)
  770.  (SET #Binary (P_AskBinary))
  771. (COMPLETE 2)
  772.  (SET #Language (P_AskCatalogs #Language))
  773. (COMPLETE 3)
  774.  (SET #Documents (P_AskHelp #Documents))
  775. (COMPLETE 4)
  776.  
  777. ;***** Delete old Data and Prefs *****
  778. (DELETE (TACKON #ApplicationDir "Docs") (optional FORCE) (ALL))
  779. (DELETE (TACKON #ApplicationDir "Docs.info" (optional FORCE) ))
  780. (DELETE (TACKON #ApplicationDir "DefaultCards/Default.Card" (optional FORCE) ))
  781. (DELETE (TACKON #ApplicationDir "DefaultCards/Sun-1152BLK.Card" (optional FORCE) ))
  782. (DELETE (TACKON #ApplicationDir "Modules/Modules.doc" (optional FORCE) ))
  783. (DELETE (TACKON #ApplicationDir "Modules/RamCard_mcm.asm" (optional FORCE) ))
  784. (DELETE (TACKON #ApplicationDir "Modules/Empty_mcm.asm" (optional FORCE) ))
  785. (DELETE (TACKON #ApplicationDir "Modules/Include.i" (optional FORCE) ))
  786. (DELETE (TACKON #ApplicationDir "Patches/SGT/SGT.doc" (optional FORCE) ))
  787. (DELETE (TACKON #ApplicationDir "Modules/MCControl.mcm" (optional FORCE) ))
  788. (DELETE (TACKON #ApplicationDir "Modules/MCControlSlow.mcm" (optional FORCE) ))
  789. (DELETE (TACKON #ApplicationDir "Modules/MCControlIRQBridge.mcm" (optional FORCE) ))
  790. ;***** Create empty Drawers *****
  791. (MAKEDIR #ApplicationDir)
  792. (MAKEDIR (TACKON #ApplicationDir "Prefs"))
  793. (MAKEDIR (TACKON #ApplicationDir "SaveGames"))
  794.  
  795. (COMPLETE 10)
  796. (DELETE (TACKON #ApplicationDir "bin") (optional FORCE) (ALL))
  797.  (P_CopyBinary #ApplicationName)
  798. (COMPLETE 20)
  799. (DELETE (TACKON #ApplicationDir "catalogs") (optional FORCE) (ALL))
  800.  (P_CopyCatalogs #Language)
  801. (COMPLETE 30)
  802. (DELETE (TACKON #ApplicationDir "Help") (optional FORCE) (ALL))
  803.  (P_CopyHelp #Documents)
  804. (COMPLETE 40)
  805.  (P_CopyDir "Modules")
  806. (COMPLETE 50)
  807.  (P_CopyDir "MemoryCards")
  808. (COMPLETE 60)
  809.  (P_CopyDir "DefaultCards")
  810. (COMPLETE 70)
  811.  (P_CopyDir "Patches")
  812.  (P_CopyDir "Prefs")
  813.  (P_CopyDir "Help/Pictures")
  814.  (P_Keyfile)
  815. (COMPLETE 80)
  816.  (P_CopyDir "Bonus")
  817.  (P_CopyArchiveIcon)
  818.  (P_CopyFile "MCControl.info")
  819.  (P_CopyFile "Help.info")
  820.  (P_CopyFile "Warning")
  821.  
  822. (COMPLETE 90)
  823. ;-----
  824. (DELETE (TACKON #ApplicationDir "Modules.info"))
  825. (DELETE (TACKON #ApplicationDir "MemoryCards.info"))
  826. (DELETE (TACKON #ApplicationDir "DefaultCards.info"))
  827. (DELETE (TACKON #ApplicationDir "Patches.info"))
  828.  
  829. (DELETE (TACKON #ApplicationDir "Prefs.info"))
  830. (DELETE (TACKON #ApplicationDir "SaveGames.info"))
  831. (DELETE (TACKON #ApplicationDir "Bonus.info"))
  832.  
  833. (run "c:avail Flush")
  834. (COMPLETE 100)
  835. (message (#App-exit #ApplicationName #ApplicationName #ApplicationDir))
  836. (exit (QUIET))
  837. ;-----------------------------------------------
  838. )) ;IF #InstallerMode = 0
  839. ;-----------  Deinstallation -------------------
  840. (IF (= #InstallerMode "1") (
  841.  
  842. (SET #ApplicationDir (P_GetDeInstallDir))
  843.  
  844. (COMPLETE 20)
  845. (DELETE (TACKON #ApplicationDir "Modules") (optional FORCE) (ALL))
  846. (DELETE (TACKON #ApplicationDir "DefaultCards") (optional FORCE) (ALL))
  847. (DELETE (TACKON #ApplicationDir "Patches") (optional FORCE) (ALL))
  848. (COMPLETE 30)
  849. (DELETE (TACKON #ApplicationDir "Help") (optional FORCE) (ALL))
  850. (DELETE (TACKON #ApplicationDir "Help.info" (optional FORCE) ))
  851. (COMPLETE 40)
  852. (DELETE (TACKON #ApplicationDir "Install") (optional FORCE) (ALL))
  853. (DELETE (TACKON #ApplicationDir "Install.info" (optional FORCE) ))
  854. (COMPLETE 50)
  855. (DELETE (TACKON #ApplicationDir "Catalogs") (optional FORCE) (ALL))
  856. (COMPLETE 60)
  857. (DELETE (TACKON #ApplicationDir "Bin") (optional FORCE) (ALL))
  858. (COMPLETE 70)
  859. (DELETE (TACKON #ApplicationDir "Prefs") (optional FORCE) (ALL))
  860. (COMPLETE 80)
  861. (DELETE (TACKON #ApplicationDir "MCControl") (optional FORCE))
  862. (DELETE (TACKON #ApplicationDir "MCControl.info" (optional FORCE) ))
  863. (DELETE (TACKON #ApplicationDir "Warning") (optional FORCE))
  864. (DELETE (TACKON #ApplicationDir "Warning.info" (optional FORCE) ))
  865. (COMPLETE 90)
  866. (DELETE (TACKON #ApplicationDir "MemoryCards/example.mcd") (optional FORCE))
  867. (DELETE (TACKON #ApplicationDir "MemoryCards/example2.mcd") (optional FORCE))
  868. (DELETE (TACKON #ApplicationDir "MemoryCards/example3.mcd") (optional FORCE))
  869. (DELETE (TACKON #ApplicationDir "MemoryCards/example4.mcd") (optional FORCE))
  870. (DELETE (TACKON #ApplicationDir "MemoryCards/example5.mcd") (optional FORCE))
  871. (DELETE (TACKON #ApplicationDir "MemoryCards/example6.mcd") (optional FORCE))
  872. (DELETE (TACKON #ApplicationDir "MemoryCards/example7.mcd") (optional FORCE))
  873. (DELETE (TACKON #ApplicationDir "MemoryCards/example8.mcd") (optional FORCE))
  874. (DELETE (TACKON #ApplicationDir "MemoryCards/example9.mcd") (optional FORCE))
  875.  
  876. (DELETE (TACKON #ApplicationDir "MemoryCards"))
  877. (DELETE (TACKON #ApplicationDir "SaveGames"))
  878. (DELETE (TACKON #ApplicationDir "Bonus"))
  879. (DELETE #ApplicationDir)
  880. (DELETE (CAT #ApplicationDir ".info"))
  881.  
  882. (COMPLETE 100)
  883.  
  884. (Message (#Deinstall-Done #ApplicationName))
  885. (exit (QUIET))
  886.  
  887. ;-----------------------------------------------
  888. )) ;IF #InstallerMode = 1
  889. ;-----------------------------------------------
  890.  
  891.